﻿@{
    ViewBag.Title = "About Us";
}
@{ Html.Telerik().Window()
        .Name("Window")
        .Title("Telerik Window for ASP.NET MVC")
        .Draggable((bool)ViewData["movable"])
        .Resizable(resizing => resizing
            .Enabled((bool)ViewData["resizable"])
            .MinHeight(250)
            .MinWidth(250)
            .MaxHeight(500)
            .MaxWidth(500)
        )
        .Modal((bool)ViewData["modal"])
        .Buttons(b => b.Maximize().Close())
        .Content(@<text>
                    @(Html.Telerik().AutoComplete()
                        .BindTo(ViewData["CustomerSearch"] as List<string>)
                        .Name("myAutoComplete")
                        .HighlightFirstMatch(true)
                        .AutoFill(true)
                        .HtmlAttributes(new { @class = "tbox readonly" })
                    )
                </text>)
        .Width(300)
        .Height(300)
        .Render();
}
@{ Html.Telerik().ScriptRegistrar()
        .OnDocumentReady(@<text> var windowElement = $('#Window'); var undoButton =
    $('#undo'); undoButton .bind('click', function(e) { windowElement.data('tWindow').open();
    undoButton.hide(); }) .toggle(!windowElement.is(':visible')); windowElement.bind('close',
    function() { undoButton.show(); });
    </text>);
}
